import {Post} from "@/axios/api.js";
import {ElMessage} from "element-plus";

export async function PostWKT(wkt) {
    return await Post('/River/sumbyregion',{"wkt":wkt.toString()}).then((response) => {
        const { code, msg,data: res } = response.data;
        if (code === 200) {
            ElMessage.success(msg ?? "Submitted!");
            return res
        } else {
            //ElMessage.error(msg);
            ElMessage.error("提交失败");
        }
        return null
    });
}
